﻿@model CultuRAM.Models.Entity

@{
    ViewBag.Title = "Editar Entidade";
}

<h4><i class="icon-pencil"></i> Editar Entidade</h4>

@using (Html.BeginForm(null, null, FormMethod.Post, new { @class = "form-horizontal" }))
{
    @*@Html.ValidationSummary(false)*@

    
        <br/>
        <div class="row">
            <div class="span12">
                <div class="control-group">
                    @Html.LabelFor(model => model.Name, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextBoxFor(model => model.Name, new {@class = "span11"})
                        @*@Html.ValidationMessageFor(model => model.Name)*@
                    </div>
                </div>
            </div>
        </div>
                        
        <div class="row">
            <div class="span12">
                <div class="control-group">
                    @Html.LabelFor(model => model.Address, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextAreaFor(model => model.Address, new {@class = "span11"})
                        @*@Html.ValidationMessageFor(model => model.Address)*@
                    </div>
                </div>
            </div>
        </div>
   
        <div class="row">
            <div class="span4">
                <div class="control-group">
                    @Html.LabelFor(model => model.PostalCode, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextBoxFor(model => model.PostalCode, new { @class = "span2" })
                        @*@Html.ValidationMessageFor(model => model.PostalCode)*@
                    </div>
                </div>
            </div>
            <div class="span4">
                <div class="control-group">
                    @Html.LabelFor(model => model.City, new { @class = "control-label" })
                    <div class="controls">
                        @Html.DropDownListFor(model => model.CityId, (SelectList)ViewBag.Cities, "- Selecione - ", new {@class="span2"})
                        @*@Html.DropDownList("CityId", String.Empty)*@
                        @*@Html.ValidationMessageFor(model => model.CityId)*@
                    </div>
                </div>
            </div>
            <div class="span4">
                <div class="control-group">
                    @Html.LabelFor(model => model.Email, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextBoxFor(model => model.Email, new { @class = "span3" })
                        @*@Html.ValidationMessageFor(model => model.Email)*@
                    </div>
                </div>
            </div>      
        </div>
                   
                   
        <div class="row">
            <div class="span4">
                <div class="control-group">
                    @Html.LabelFor(model => model.Phone, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextBoxFor(model => model.Phone, new { @class = "span2" })
                        @*@Html.ValidationMessageFor(model => model.Phone)*@
                    </div>
                </div>
            </div>
            <div class="span4">
                <div class="control-group">
                    @Html.LabelFor(model => model.Fax, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextBoxFor(model => model.Fax, new { @class = "span2" })
                        @*@Html.ValidationMessageFor(model => model.Fax)*@
                    </div>
                </div>
            </div>
            <div class="span4">
                <div class="control-group">
                    @Html.LabelFor(model => model.CellPhone, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextBoxFor(model => model.CellPhone, new { @class = "span2" })
                        @*@Html.ValidationMessageFor(model => model.CellPhone)*@
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="span6">
                <div class="control-group">
                    @Html.LabelFor(model => model.Responsible, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextBoxFor(model => model.Responsible, new { @class = "span4" })
                        @*@Html.ValidationMessageFor(model => model.Responsible)*@
                    </div>
                </div>
            </div>
            <div class="span6">
                <div class="control-group">
                    @Html.LabelFor(model => model.ResponsibleContact, new { @class = "control-label" })
                    <div class="controls">
                        @Html.TextBoxFor(model => model.ResponsibleContact, new { @class = "span5" })
                        @*@Html.ValidationMessageFor(model => model.ResponsibleContact)*@
                    </div>
                </div>
            </div>   
        </div>
                   
    <div class="row">
        <div class="span6">
            <div class="control-group">
                @Html.LabelFor(model => model.Logo, new { @class = "control-label" })
                <div class="controls">
                    @Html.TextBoxFor(model => model.Logo, new { @class = "span4", @type="file"})
                    @*<button value="logo" class="btn btn-default btn-sm">...</button>*@
                    @*@Html.ValidationMessageFor(model => model.Logo)*@
                </div>
            </div> 
        </div>
        <div class="span6">
            <div class="control-group">
                @Html.LabelFor(model => model.EntityType, new { @class = "control-label" })
                <div class="controls">
                    @Html.DropDownListFor(model => model.EntityTypeId, (SelectList)ViewBag.EntityTypes, "- Selecione - ", new {@class="span5"})
                    @*@Html.DropDownList("EntityTypeId", String.Empty)*@
                    @*@Html.ValidationMessageFor(model => model.EntityTypeId)*@
                </div>
            </div> 
        </div>
    </div>
    
    <br/>
       
    <div class="row">
        <div class="span12">
            <div class="control-group">
                <div class="controls">
                <button type="submit" value="Save" class="btn btn-primary"><i class="icon-ok icon-white"></i> Guardar Alterações</button>
                <a href="@Url.Action("Index", "Entity")" class = "btn btn-default"><i class="icon-ban-circle"></i> Cancelar Alterações</a>
                </div>
            </div>
        </div>
    </div>

}




